using UnityEngine;
using System.Collections;

[System.Serializable]
public class InfoAnimation
{
	#region Attributes
	
	//The name of animation.
	[SerializeField]
	private string name = "idle";
	
	//The texture that contains your frames.
	[SerializeField]
	private Texture2D image;
	
	//Tiles(x,y) of image.
	[SerializeField]
	private Vector2 numTiles;
	
	//Time per frame(on seconds).
	[SerializeField]
	private float timePerFrame;
	
	//Initial and final frame of defined tile.
	[SerializeField]
	private int initialFrame;
	[SerializeField]
	private int finalFrame;
	
	//Wrap mode of animation ?
	[SerializeField]
	private SimpleUVWrapMode wrapMode;
	
	public enum SimpleUVWrapMode
	{
		once, loop, pingPong, loopPingPong,
	}
	
	#endregion Attributes;
	
	#region Getters
	
	public Texture2D GetImage
	{
		get { return image; }
	}
	
	public string GetName
	{
		get { return name; }
	}
	
	public Vector2 NumTiles
	{
		get { return numTiles; }
	}
	
	public float GetTime
	{
		get { return timePerFrame; }
	}
	
	public int GetInitialFrame
	{
		get { return initialFrame; }
	}
	
	public int GetFinalFrame
	{
		get { return finalFrame; }
	}
	
	public SimpleUVWrapMode GetWrapMode
	{
		get { return wrapMode; }
	}
	
	#endregion Getters;
}
